package org.ricks.game.entity;

import lombok.Data;
import org.ricks.orm.anno.EntityCache;
import org.ricks.orm.anno.Id;
import org.ricks.orm.model.IEntity;

import java.util.HashMap;
import java.util.Map;

@Data
@EntityCache
public class ItemEntity implements IEntity<Long> {

    /**
     * playerID
     */
    @Id
    private long playerId;

    private Map<Integer, Long> baseItems = new HashMap<>();

    /**
     * 装备道具
     */
    private Map<Long, EquipInfo> equipInfoMap = new HashMap<>();


    @Override
    public Long id() {
        return playerId;
    }

    public long getPlayerId() {
        return playerId;
    }

    public Map<Integer, Long> getBaseItems() {
        return baseItems;
    }

    public Map<Long, EquipInfo> getEquipInfoMap() {
        return equipInfoMap;
    }

    public void setPlayerId(long playerId) {
        this.playerId = playerId;
    }

    public void setBaseItems(Map<Integer, Long> baseItems) {
        this.baseItems = baseItems;
    }

    public void setEquipInfoMap(Map<Long, EquipInfo> equipInfoMap) {
        this.equipInfoMap = equipInfoMap;
    }
}
